#ifndef __DMA_H__
#define __DMA_H__

/* These definitions mirror those in pci.h, so they can be used
 * interchangeably with their PCI_ counterparts */
enum dma_data_direction {
  DMA_BIDIRECTIONAL = 0,
  DMA_TO_DEVICE = 1,
  DMA_FROM_DEVICE = 2,
  DMA_NONE = 3,
}; 

struct scatterlist {
  unsigned long page_link;
  unsigned int  offset;
  unsigned int  length;
  unsigned int 	dma_address;
  unsigned int  dma_length;
};

struct sg_table {
  struct scatterlist *sgl;  /* the list */
  unsigned int nents;   /* number of mapped entries */
  unsigned int orig_nents;  /* original size of list */
};

#endif
